"""
总结对象的相似之处得到了类
总结类的相似指出得到父类
"""
class People:
    school = "不造啊"
    def __init__(self,name,age,sex):
        self.name = name
        self.age = age
        self.sex = sex

class Student(People): # 假如学生有分数、家庭住址、手机号码 怎么搞？
    def play(self):
        print("%s play football" %self.name)

class Teacher(People):
    def course(self):
        print("%s course"%self.name)

# 实例化的时候，子类没有__init__方法会调用父类的
stu1 = Student(name = "张三" , age = 30 , sex = "女")
# print(stu1.__dict__) # {'name': '张三', 'age': 30, 'sex': '女'}
tea1 = Teacher("小白",19,'男')
print(tea1.__dict__) # {'name': '小白', 'age': 19, 'sex': '男'}

# 但是这里有个问题子类有新的属性需要实例化的时候参数怎么办





